<!doctype html>
<html>
<head>
  <style type="text/css">
    body,img {
    margin:0;
    padding:0;
    }
    img {
    display:block;
    margin:0 auto;
    }
  </style>
</head>
<body>
  
  <img src="./seafile-logo.png" width="180" />
  
  <script type="text/javascript">
    window.onload = function() {
    var img = document.getElementsByTagName('img')[0];
    img.style.marginTop = (window.innerHeight - img.height)/2 + 'px';
    }
    window.onresize = function(event) {
    var img = document.getElementsByTagName('img')[0];
    img.style.marginTop = (window.innerHeight - img.height)/2 + 'px';    
    }
  </script>
</body>
</html>
